import { useState, Suspense } from "react"
import { useRoutes } from "react-router-dom"
import routes from "@/router"
import "@/App.scss"

import { ConfigProvider } from "antd"
import zhCN from "antd/locale/zh_CN"

import RouterAuth from "@/components/RouterAuth"

function App() {
  const router = useRoutes(routes)
  const [locale] = useState(zhCN)

  return (
    <ConfigProvider locale={locale}>
      <div className="App">
        <RouterAuth>{router}</RouterAuth>
      </div>
    </ConfigProvider>
  )
}

export default App
